package 第13届;
import java.util.*;
import java.io.*;
public class D_最少刷题数_2143_暴力_通过一半 {
	static int a[];
	static int b[];
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		StringTokenizer st;
		int n = Integer.parseInt(br.readLine());
		a = new int[n];
		b = new int[n];
		st = new StringTokenizer(br.readLine());
		for(int i = 0 ; i < n; i++) {
			a[i] = Integer.parseInt(st.nextToken());
			b[i] = a[i];
		}
		
		// 每个学生
		for(int i = 0; i < n; i++) {
			int count = 0;
			while(!check(i)) {
				b[i]++;
				count++;
			}
			bw.write(count + " ");
		}
		bw.flush();
	}
	// 判断当前刷题数是否符合要求 返回后 不符合则+1然后继续判断
	public static boolean check(int student) {
		int low = 0;
		int more = 0;
		for(int i = 0; i < a.length; i++) {
			if(i == student) {
				continue;
			}
			if(a[i] > b[student]) {
				more++;
			}
			if(a[i] < b[student]) {
				low++;
			}
		}
		
		

		// 刷题数比本学生多的人数 <= 刷题数比本学生少的人数
		if(more <= low) {
			return true;
		}
		
		return false;
	}
	
}
